package com.lagou.io;

import java.io.InputStream;

/**
 * @author ADMIN
 * @date 2021/3/21 16:25
 */
public class Resource {


    /**
     * 根据配置文件的路径 将配置文件加载成字节流,存储到内存中
     * @param path
     * @return
     */
    public static InputStream getResourceAsSteam(String path) {
        InputStream resourceAsSteam = Resource.class.getClassLoader().getResourceAsStream(path);
        return resourceAsSteam;
    }
}
